import request from '@/utils/request'

// 查询客户管理列表
export function listConsumer(query) {
  return request({
    url: '/research/consumer/list',
    method: 'get',
    params: query
  })
}

// 查询客户管理详细
export function getConsumer(consumerId) {
  return request({
    url: '/research/consumer/' + consumerId,
    method: 'get'
  })
}

// 新增客户管理
export function addConsumer(data) {
  return request({
    url: '/research/consumer',
    method: 'post',
    data: data
  })
}

// 修改客户管理
export function updateConsumer(data) {
  return request({
    url: '/research/consumer',
    method: 'put',
    data: data
  })
}

// 删除客户管理
export function delConsumer(consumerId) {
  return request({
    url: '/research/consumer/' + consumerId,
    method: 'delete'
  })
}

// 导出客户管理
export function exportConsumer(query) {
  return request({
    url: '/research/consumer/export',
    method: 'get',
    params: query
  })
}

// 查询客户问卷详情
export function getConsumerQuestionnaireDetail(consumerId) {
  return request({
    url: '/research/consumer/questionnaire/detail/' + consumerId,
    method: 'get'
  })
}
